package com.forclass;

import java.lang.reflect.Field;

public class Books20ProgramMain {
    public static void main(String[] args) throws Exception {
        Class<?> clazz = Class.forName("com.forclass.Books20Program");

        System.out.println("clazz.getFields()");
        for (Field f:clazz.getFields()) {
            System.out.println("getFields 方法返回的成员有：" + f);
        }

        System.out.println("clazz.getFields()");
        for (Field df:clazz.getDeclaredFields()) {
            System.out.println("getDeclaredFields 方法返回的成员有：" + df);
        }
    }
}
